<template>
   <div>
      <iframe :src="src1"  id="imgiframe" ></iframe>
   </div>
</template>

<script>
import { pro } from '../../../config/env'
 import { mapState, mapGetters, mapMutations } from 'vuex'
  export default {
    props: ['cmmdtyCode'],
    data() {
      return {
        src1: '',
      }
    },
    created (){
      this.$nextTick(() => {
        var shop = $('.shop');
        $('#imgiframe').height($('.protool').offset().top - shop.offset().top);
      })
      this.src1 = pro + '/api/cmmdty/getCmmdtyImgText/'+this.position.cityCode+'_'+this.position.storeLocation+'_'+this.cmmdtyCode+'.htm'
    },
    computed: {
      ...mapGetters({
        position: 'position'
      })
  },
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
  #imgiframe {
    width: 100%;
    border:0;
  }
</style>
